package A_review.re2_17;

public class Class125 {

    public boolean isPalindrome(String s) {
        boolean ans=true;
        char[] chars = s.toCharArray();
        StringBuffer buffer = new StringBuffer();
        for (char  a: chars) {
            if (Character.isLetter(a)){
                buffer.append(Character.toLowerCase(a));
            }else if (Character.isDigit(a)){
                buffer.append(a);
            }
        }
        String s1 = buffer.toString();
        char[] chars1 = s1.toCharArray();
        int length = chars1.length;
        int r=length-1;
        int l=0;
        while (l<r){
            if (chars1[l]==chars1[r]){
                l++;
                r--;
            }else {
                ans=false;
                break;
            }
        }
        return  ans;
    }

    public static void main(String[] args) {
        Class125 class125 = new Class125();
        System.out.println(class125.isPalindrome(""));
    }
}
